﻿<phone:PhoneApplicationPage 
    x:Class="AuchanScan.Views.ToBuyPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:lc="clr-namespace:SamSoft.Controls"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar>
            <shell:ApplicationBarIconButton IconUri="/icons/appbar.add.rest.png" IsEnabled="True" Text="ajouter"/>
            <shell:ApplicationBarIconButton IconUri="/icons/appbar.delete.rest.png" IsEnabled="True" Text="supprimer" Click="ApplicationBarIconButton_Click"/>
            <shell:ApplicationBarIconButton IconUri="/icons/appbar.pin.rest.png" IsEnabled="True" Text="épingler"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush Stretch="Fill" ImageSource="/images/Page_Background2.png"/>
        </Grid.Background>
        <lc:ListBoxCheckBox x:Name="ListBoxCheckBox" ShowCheckBox="False" ItemsSource="{Binding Datas.ToBuyList}" Margin="12,0,0,0" BorderThickness="12,70,12,0">
            <lc:ListBoxCheckBox.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="0,0,0,6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid Height="62" Width="62" VerticalAlignment="Center" Background="White">
                            <Image d:LayoutOverrides="GridBox" />
                        </Grid>
                        <TextBlock Text="{Binding Name}" Style="{StaticResource PhoneTextExtraLargeStyle}" Margin="12,0"
                   d:LayoutOverrides="Width, Height" Grid.Column="1" VerticalAlignment="Center" TextWrapping="Wrap" />
                        <StackPanel Grid.Column="2" Margin="0,4" d:LayoutOverrides="Height">
                            <Image Source="../icons/appbar.stock.black.png" Stretch="Fill" Width="48" Height="48" />
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,-6,12,0">
                                <TextBlock Text="{Binding Price}" d:LayoutOverrides="Height" Style="{StaticResource PhoneTextTitle3Style}" Margin="12,0,0,0" />
                                <TextBlock Text="€" d:LayoutOverrides="Height" Style="{StaticResource PhoneTextTitle3Style}" Margin="6,0,0,0" />
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </lc:ListBoxCheckBox.ItemTemplate>
        </lc:ListBoxCheckBox>
        <Image Height="64" Source="/images/herbe.png" Stretch="Fill" VerticalAlignment="Bottom" Margin="0,0,0,8"/>
        <Rectangle Height="8" Stroke="Black" VerticalAlignment="Bottom">
            <Rectangle.Fill>
                <SolidColorBrush Color="{StaticResource AccentColorListe}"/>
            </Rectangle.Fill>
        </Rectangle>
        <Image Source="../images/Logo.png" HorizontalAlignment="Left" Height="66.5550003051758" MaxHeight="50"
        	Margin="12,12,0,0" VerticalAlignment="Top" />
    </Grid>
</phone:PhoneApplicationPage>
